<?php

/**
* @current cmsappversions.php
* @author   LiuYang <liu_yang@haibao.com>
* @date 2017年2月8日 下午5:58:45
*/
namespace haibao\jiepai\model\data\app;

class CmsAppVersions extends \haibao\jiepai\model\data\Base{
    /**
     *  1.苹果，2.安卓 , 3 双平台
     */
    const PHONEOS_APPLE = 1;
    const PHONEOS_ANDROID = 2;
    const PHONEOS_DOUBLE = 3;
    /**
     *  0-建议升级，1-强制升级
     */
    const STATUS_ADVICE = 0;
    const STATUS_FORCE = 1;
    
    /**
     * 删除时置为-1，默认是0
     * 是否是删除
     */
    const FLAG_IS = 0;
    const FLAG_DEL = -1;
    
    /**
     * 版本号
     */
    public $AppVersion;
    /**
     * 升级提醒描述
     */
    public $Description;
    
    public $PhoneOS;
    
    public $Title;
    /**
     * 创建者ID
     */
    public $UserID;
    /**
     * 下载地址
     */
    public $DownloadUrl;
    /**
     * 创建时间
     */
    public $CreateTime;
    /**
     * 生效时间
     */
    public $UpdateTime;
    
    public $Status;
    
    public $Flag;
    
    public $AppleUrl;
    
    public $AndroidUrl;
    
    public function __construct(){
        parent::__construct();
        $this->setColumnName('Id', 'ID');
        
        $this->stringField('AppVersion', 'AppVersion');
        $this->stringField('Description', 'Description');
        $this->intField('PhoneOS', 'PhoneOS');
        $this->stringField('Title', 'Title');
        $this->intField('UserID', 'UserID');
        $this->stringField('DownloadUrl', 'DownloadUrl');
        $this->dateField('CreateTime', 'CreateTime');
        $this->dateField('UpdateTime', 'UpdateTime');
        $this->intField('Status', 'Status');
        $this->intField('Flag', 'Flag');
        $this->stringField('AppleUrl', 'AppleUrl');
        $this->stringField('AndroidUrl', 'AndroidUrl');
        
        $this->setTableName('cms_app_versions');
    }
}
